package com.zxxy.gulimall.auth.test;

import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

public class productandconsumer {

    private int number = 0;
    private Lock lock = new ReentrantLock();

    public void increment()throws  Exception{
        // 判断
        while(number!=0){
            // 等待，不能生产

        }

    }
}
